From f09f5e26a4f1354e9aabbc54a892a959c93c1282 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 4 Aug 2007 09:48:27 +0000 Subject: [PATCH] (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s, add comment explaining why. --- src/gtkutil.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index f52e68b1230..29aafc013e9 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3372,8 +3372,16 @@ xg_tool_bar_callback (w, client_data) key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); XSETFRAME (frame, f); + + /* We generate two events here. The first one is to set the prefix + to `(tool_bar)', see keyboard.c. */ event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; + event.arg = frame; + kbd_buffer_store_event (&event); + + event.kind = TOOL_BAR_EVENT; + event.frame_or_window = frame; event.arg = key; /* Convert between the modifier bits GDK uses and the modifier bits Emacs uses. This assumes GDK an X masks are the same, which they are when -- 2.30.2